package ControlLayer;


import ModelLayer.*;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

/**
 * The test class DVDCollectionTest.
 *
 * @author  (your name)
 * @version (a version number or a date)
 */
public class DVDCollectionTest
{
    private ControlLayer.DVDCtr dVDCtr1;
    /**
     * Default constructor for test class DVDCollectionTest
     */
    public DVDCollectionTest()
    {
        
    }

    /**
     * Sets up the test fixture.
     *
     * Called before every test case method.
     */
    @Before
    public void setUp()
    {
        dVDCtr1 = new ControlLayer.DVDCtr();
        DVD dvd2 = new DVD(1, "titlu", "artist", "data");
        DVD dvd3 = new DVD(2, "titlu2", "artist2", "data2");
        dVDCtr1.createDvd(dvd2);
        dVDCtr1.createDvd(dvd3);
        dVDCtr1.createCopy(1, 11, "date1", 101, true);
        dVDCtr1.createCopy(2, 21, "date2", 101, true);
        dVDCtr1.createCopy(1, 31, "date", 89, true);
        dVDCtr1.listAllDvd();
        dVDCtr1.listAllCopies(1);
        dVDCtr1.listAllCopies(2);
        dVDCtr1.getDvd(1);
        dVDCtr1.getDvd(2);
        dVDCtr1.updateDvd(dvd2);
    }

    /**
     * Tears down the test fixture.
     *
     * Called after every test case method.
     */
    @After
    public void tearDown()
    {
    }

    @Test
    public void run()
    {
        dVDCtr1 = new ControlLayer.DVDCtr();
        DVD dvd2 = new DVD(1, "titlu", "artist", "data");
        DVD dvd3 = new DVD(2, "titlu2", "artist2", "data2");
        dVDCtr1.createDvd(dvd2);
        dVDCtr1.createDvd(dvd3);
        dVDCtr1.createCopy(1, 11, "date1", 101, true);
        dVDCtr1.createCopy(2, 21, "date2", 101, true);
        dVDCtr1.createCopy(1, 31, "date", 89, true);
    }
}

